Skip to content

Add script to draft release notes from GitHub API#8934

Open
tautschnig wants to merge 1 commit into
diffblue:developfrom
tautschnig:fix-7907-create-changelog
Open

Add script to draft release notes from GitHub API#8934
tautschnig wants to merge 1 commit into
diffblue:developfrom
tautschnig:fix-7907-create-changelog

Conversation

@tautschnig

Copy link
Copy Markdown
Collaborator

Add scripts/draft_release_notes.py, which calls the GitHub release-notes generation endpoint (via gh) to produce a PR list in the same format as the existing CHANGELOG file. It also prepends a heuristic draft summary paragraph that highlights user-visible features and counts bug fixes. The summary is marked with an HTML comment reminding the release manager to review and edit it before committing.

Usage: scripts/draft_release_notes.py cbmc-

Also add a link to the CHANGELOG file in the release body generated by the regular-release workflow, and update doc/ADR/release_process.md to document the new script.

Fixes: #7907

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@tautschnig tautschnig self-assigned this Mar 30, 2026
Copilot AI review requested due to automatic review settings March 30, 2026 15:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds automation to draft CBMC release notes from GitHub-generated release notes, and updates the release workflow/docs to integrate the changelog into the release process.

Changes:

  • Add scripts/draft_release_notes.py to generate a draft CHANGELOG entry (including a heuristic summary) using the GitHub release-notes API via gh.
  • Document the new changelog drafting step in doc/ADR/release_process.md.
  • Add a CHANGELOG link to the release body in .github/workflows/regular-release.yaml.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
scripts/draft_release_notes.py New script to generate draft release notes/CHANGELOG entry from GitHub API output.
doc/ADR/release_process.md Documents the changelog/release-notes drafting step for release managers.
.github/workflows/regular-release.yaml Adds a CHANGELOG reference to the auto-created GitHub release body.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/draft_release_notes.py Outdated
Comment thread scripts/draft_release_notes.py Outdated
Comment thread doc/ADR/release_process.md Outdated
@codecov

codecov Bot commented Mar 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.60%. Comparing base (5453820) to head (690f3c6).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8934      +/-   ##
===========================================
- Coverage    80.60%   80.60%   -0.01%     
===========================================
  Files         1711     1711              
  Lines       189466   189466              
  Branches        73       73              
===========================================
- Hits        152719   152713       -6     
- Misses       36747    36753       +6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tautschnig tautschnig force-pushed the fix-7907-create-changelog branch from a0f6042 to 08e4d46 Compare April 19, 2026 09:04
@tautschnig tautschnig assigned peterschrammel and TGWDB and unassigned tautschnig Apr 19, 2026
Add scripts/draft_release_notes.py, which calls GitHub's release-notes
generation endpoint (via `gh`) to produce a PR list in the same format as
the existing CHANGELOG file. It prepends a heuristic draft summary that
highlights user-visible feature PRs and counts the remaining changes,
marked with an HTML comment reminding the release manager to review and
edit it. When no user-visible feature is detected, a TODO placeholder is
emitted instead of guessing. Errors from a missing or failing `gh` are
reported cleanly rather than as stack traces.

Previous-tag detection only considers tags of the form cbmc-X.Y(.Z), so
historical conference/hash-suffixed tags (e.g. cbmc-4.5-sv-comp-2014) do
not collide with the bare versions when ordering. The summary is produced
as a structured value so the prose body can be wrapped independently of
the HTML comment.

Usage: scripts/draft_release_notes.py cbmc-<version>

Also add a link to the CHANGELOG file in the release body generated by the
regular-release workflow (an absolute, tag-pinned URL so it resolves from
the release page), and update doc/ADR/release_process.md to document the
new script as a numbered step performed before pushing the release tag,
including manually prepending the generated entry to CHANGELOG.

scripts/test_draft_release_notes.py adds unit tests for the previous-tag
selection (including the suffixed-tag filter) and the draft-summary
heuristic. The script was also exercised end-to-end against cbmc-6.9.0.

Fixes: diffblue#7907

Co-authored-by: Kiro <kiro-agent@users.noreply.github.com>
@tautschnig tautschnig force-pushed the fix-7907-create-changelog branch from 08e4d46 to 690f3c6 Compare June 9, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changelogs for releases

4 participants